﻿
namespace Library.OrmEnterpriseEntity.TableInfo {
	///<summary>
	///</summary>
	public abstract class TableView : DbTableView {
		protected abstract DbTable CreateTableInstance();
		public override DbTable CreateInstance() {
		  return CreateTableInstance();
		}
		public sealed override ColumnViewCollection Columns {
			get {
				return base.Columns;
			}
		}
		protected Int32ColumnView AddInt32(string columnName, bool forceHasValue, bool unique) {
			return new Int32ColumnView(columnName, false, forceHasValue, unique, this);

		}
		protected Int64ColumnView AddInt64(string columnName, bool forceHasValue, bool unique) {
			return new Int64ColumnView(columnName, false, forceHasValue, unique, this);

		}
		protected DateColumnView AddDate(string columnName, bool forceHasValue, bool unique) {
			return new DateColumnView(columnName, false, forceHasValue, unique, this);
		}

		protected DateTimeColumnView AddDateTime(string columnName, bool forceHasValue, bool unique) {
			return new DateTimeColumnView(columnName, false, forceHasValue, unique, this);
		}
		protected BooleanColumnView AddBoolean(string columnName, bool forceHasValue, bool unique) {
			return new BooleanColumnView(columnName, false, forceHasValue, unique, this);

		}

		protected AnsiColumnView AddAnsi(string columnName, bool forceHasValue, bool unique, int len) {
			return new AnsiColumnView(columnName, false, forceHasValue, unique, len, this);

		}

		protected FixAnsiColumnView AddFixAnsi(string columnName, bool forceHasValue, bool unique, int len) {
			return new FixAnsiColumnView(columnName, false, forceHasValue, unique, len, this);

		}

		protected FixUnicodeColumnView AddFixUnicode(string columnName, bool forceHasValue, bool unique, int len) {
			return new FixUnicodeColumnView(columnName, false, forceHasValue, unique, len, this);

		}

		protected UnicodeColumnView AddUnicode(string columnName, bool forceHasValue, bool unique, int len) {
			return new UnicodeColumnView(columnName, false, forceHasValue, unique, len, this);

		}
		protected ByteColumnView AddByte(string columnName, bool forceHasValue, bool unique) {
			return new ByteColumnView(columnName, false, forceHasValue, unique, this);

		}
		protected ByteArrayColumnView AddByteArray(string columnName, bool forceHasValue, bool unique, int len) {
			return new ByteArrayColumnView(columnName, false, forceHasValue, unique, len, this);

		}

		protected Int16ColumnView AddInt16(string columnName, bool forceHasValue, bool unique) {
			return new Int16ColumnView(columnName, false, forceHasValue, unique, this);

		}
		protected SingleColumnView AddSingle(string columnName, bool forceHasValue, bool unique) {
			return new SingleColumnView(columnName, false, forceHasValue, unique, this);
		}

		protected DecimalColumnView AddDecimal(string columnName, bool forceHasValue, bool unique) {
			return new DecimalColumnView(columnName, false, forceHasValue, unique, this);

		}

		protected DoubleColumnView AddDouble(string columnName, bool forceHasValue, bool unique) {
			return new DoubleColumnView(columnName, false, forceHasValue, unique, this);
		}

	}
}
